<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Thread>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%
        Ajax.EnabledCustomization();
        var forum = (Forum)ViewData["Forum"];
    %>
    <div class="ui-widget-contents">
        <% Html.RenderPartial("Detail", forum);%>
        <div style="margin-bottom: 5px; height: 30px; margin-left: 3px;">
            <%=Ajax.ForumMapPath(forum.ID)%>
        </div>
        <div class="ui-widget-zone" id="zone1" style="width: 944px; min-height: 10px;">
        </div>
        <% if (Html.IsAuthorize<DNA.Mvc.Areas.Community.Controllers.PostController>("New"))
           {
               if ((forum.IsModerator()) || (!forum.IsLock))
               {
               %>
        <div style="padding-bottom: 10px;clear:left;">
            <%=Ajax.jQueryActionLink(Html.Global("forums", "NewThread"), "ui-icon ui-icon-lightbulb", "New",
            "Post", new { forumID = forum.ID.ToString() })%>
        </div>
        <%}
           } %>
        <div style="margin-right: 5px;clear:left;">
            <% Html.RenderPartial("ThreadList", Model); %>
        </div>
        <% if (((int)ViewData["TotalRecords"]) > 20)
           { %>
        <%=Ajax.Pager("ThreadsPager", new PagerOptions()
{ 
    PageIndex = (int)ViewData["PageIndex"], 
    PageSize = (int)ViewData["PageSize"], 
    TotalRecords = (int)ViewData["TotalRecords"],
    OnPageIndexChanged = "window.location='" + Url.Action("Threads", new { id = forum.ID }) + "?index='+ui.pageIndex+'&size='+ui.pagesize;"
}, null)%>
        <%} %>
        <div style="margin: 10px">
            <ul class="ui-horizontal-list">
                <li><span class="forum-icon-thread forum-icon-thread-default" style="float: left;"></span>
                    <span style="float: left; padding-top: 4px; padding-left: 2px;">Thread</span></li>
                <li><span class="forum-icon-thread forum-icon-thread-new" style="float: left;"></span>
                    <span style="float: left; padding-top: 4px; padding-left: 2px;">New</span></li>
                <li><span class="forum-icon-thread forum-icon-thread-hot" style="float: left;"></span>
                    <span style="float: left; padding-top: 4px; padding-left: 2px;">Hot</span></li>
                <li><span class="forum-icon-thread forum-icon-thread-lock" style="float: left;"></span>
                    <span style="float: left; padding-top: 4px; padding-left: 2px;">Locked</span></li>
                <li><span class="forum-icon-thread forum-icon-thread-pinned" style="float: left;"></span>
                    <span style="float: left; padding-top: 4px; padding-left: 2px;">Pinned</span></li>
                <li><span class="forum-icon-thread forum-icon-thread-announce" style="float: left;">
                </span><span style="float: left; padding-top: 4px; padding-left: 2px;">Announcement</span></li>
            </ul>
        </div>
        <div class="ui-widget-zone" id="zone2" style="width: 944px;margin-top:5px;">
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <%=Html.CssLink("~/Content/forums.css")%>
</asp:Content>
